//读取文件的工具方法
const fs = require('fs')
module.exports.getDatajson = (filePath) => {
   return new Promise((resolve ,reject) => {
    fs.readFile(filePath, 'utf-8' , (error, data) => {
        if(error) {
            reject(error)
        } else {
            resolve(data)
        }
    })
   })
}